package com.android.syssetting

import android.Manifest
import android.util.Log
import android.view.View
import androidx.activity.viewModels
import com.camera.base.v.BaseActivity
import com.camera.routemodule.RouterPath
import com.alibaba.android.arouter.facade.annotation.Route
import com.android.syssetting.databinding.ActivitySystemInfoBinding
import com.android.syssetting.models.SysInfoModel
import com.tbruyelle.rxpermissions.RxPermissions
import dagger.hilt.android.AndroidEntryPoint
import rx.functions.Action1
@AndroidEntryPoint
@Route(path = RouterPath.path.sys_info_activity)
class SysInfoActivity: BaseActivity<ActivitySystemInfoBinding,SysInfoModel>() {
    override val viewModelClass: Class<SysInfoModel>
        get() = SysInfoModel::class.java
    override fun getLayoutId(): Int {
        return R.layout.activity_system_info
    }

    override fun getStatusBarColor(): Int {
        return R.color.title_background_color
    }

    override fun loadData() {
        mBinding.viewModel = viewModel
    }

    override fun initView() {

        var permissions = arrayOf<String?>(
            Manifest.permission.READ_PHONE_STATE,
            Manifest.permission.ACCESS_FINE_LOCATION
        )
        RxPermissions.getInstance(this@SysInfoActivity)
            .request(*permissions)
            .subscribe(object : Action1<Boolean?> {
                override fun call(t: Boolean?) {
                    if (t == true){
                    }

                }
            })
    }

    fun myClick(v: View){
        when(v.id){

        }
    }
}